home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
I-Info Magazine
/
(c)i18.d64
/
vxmodem64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
53 lines
100 REM -------------------------------
110 REM XMODEM DOWNLOAD
120 REM KERMTERM JR.
130 REM BY KERMIT R. WOODALL 1985
140 REM
150 REM -------------------------------
160 OPEN5,2,0,CHR$(6):DIMF%(255),T%(255),U%(132)
170 FORX=1TO64:T%(X)=X:NEXT X:T%(20)=8:FORX=65TO90:T%(X)=X+32:NEXT X
180 FORX=91TO95:T%(X)=X:NEXT X:FORX=193TO218:T%(X)=X-128:NEXT X
190 FORX=0TO255:Y=T%(X):IFYTHENF%(Y)=X:F%(Y+128)=X
200 NEXT X:B$=" "+CHR$(157):P$=CHR$(175)+CHR$(157):C$=CHR$(0)
210 PRINTCHR$(147)CHR$(14)"[203]ERMTERM [202]R. BY [203]ERMIT [215]OODALL - [198]1=[196]/[204]"
215 PRINT"[200]AYES/1670 [196]IALER - [198]3=[196]IALS, [198]7=[193]BORTS":PRINTP$;
220 GET#5,A$:PRINTB$CHR$(F%(ASC(A$+C$)));:POKE212,0:PRINTP$;
230 GETA$:IFA$<>""THENPRINT#5,CHR$(T%(ASC(A$)));
240 IFA$=CHR$(133)GOTO260
245 IFA$=CHR$(134)GOTO450
250 GOTO220
260 PRINT:PRINT:INPUT"[198]ILENAME";FI$:INPUT"[198]ILETYPE <[211]>EQ OR <[208]>RG";FT$
270 OPEN8,8,8,"0:"+FI$+","+FT$+",W":PRINT"[196][207][215][206][204][207][193][196][201][206][199]: ";FI$
280 FORX=1TO132:GET#5,A$:NEXT:GOSUB370
290 CK=0:FORX=1TO132
300 POKE663,0:A$="":GET#5,A$:E=PEEK(663):IFPEEK(663)=8GOTO300
310 IFX=1THENIFA$=CHR$(4)THENPRINT"[196][207][206][197]":GOSUB360:CLOSE8:GOTO210
320 U%(X)=ASC(A$+C$):CK=CK+U%(X):NEXT X:CK=CK-U%(132)
330 IFU%(132)<>(CKAND255)THENGOSUB370:PRINT"[195]HKSUM [197][210][210]":GOTO290
340 BL=BL+1:PRINT"[194]LOCK"BL
350 FORX=4TO131:PRINT#8,CHR$(U%(X));:NEXT X:GOSUB360:GOTO290
360 PRINT#5,CHR$(6);:ER=0:RETURN
370 ER=ER+1:IFER=11THENCLOSE8:PRINT"[195][193][206][195][197][204][204][197][196]":PRINT#5,CHR$(24);:GOTO210
380 PRINT#5,CHR$(21);:RETURN
400 REM HAYES/1670 DIALING
450 GOSUB 500:REM SETUP MODEM TO DIAL
460 INPUT"[194][194][211]#";N$:GOSUB 540:FORA=1TOLEN(N$):A$=MID$(N$,A,1):GOSUB 550:NEXT
470 GOSUB 560:GOTO 210
500 REM HAYES/1670 DIALING
505 PRINT#5,"[193][212][218]":PRINT#5,"[193][212][197]0 [214]0":RETURN
540 PRINT#5,"[193][212][196]";:RETURN
550 PRINT#5,A$;:RETURN
560 PRINT#5,CHR$(13);:GOSUB800:GOSUB600:IFA$<>"1"THEN RETURN
570 PRINT#5,"[193][212][218]":GOTO 210
600 E$="":REM INPUT FROM HAYES
610 GOSUB 700
615 IF A$=CHR$(13) OR A$=CHR$(141) THEN A$=E$:RETURN
620 IF D$=CHR$(136) GOTO 210
630 E$=E$+A$:GOTO 610
700 REM GET FROM HAYES
710 GET#5,A$:PRINT""A$"[144]";:GET D$:IFA$="" AND D$<>CHR$(136) GOTO 710
720 IF D$=CHR$(136) GOTO 210
730 RETURN
800 REM CLEAR BUFFER
810 FORA=1TO256:GET#5,A$:NEXT:RETURN